@extends('home.article')
@section('style')
    <style>
        #text{
            width: 754px;
            height: 80px;
            padding: 10px;
            vertical-align: middle;
        }
        #text a{
            display: inline-block;
            width: 500px;
            height: 80px;
            margin-left: 10px;
            line-height: 80px;
            font-size: 18px;
            font-weight: bold;
            color: #9e9e9e;
        }
        #text a:hover{
            color: #fc8383;
        }
    </style>
    @endsection
@section('content')
<div id="content" class="ng-scope">
    <div class="warp">
        <navbar class="ng-isolate-scope"><aside class="sidebar">
                <!-- ngRepeat: nav in vm.menuList --><a  class="ng-binding ng-scope active" id="create">
                    <i class="icon art"></i>
                    写文章
                    <!-- ngIf: nav.extra_tit --><em ng-if="nav.extra_tit" class="ng-binding ng-scope"></em><!-- end ngIf: nav.extra_tit -->
                </a><!-- end ngRepeat: nav in vm.menuList --><a class="ng-binding ng-scope" id="created">
                    <i class="icon list"></i>
                    已发布文章
                    <!-- ngIf: nav.extra_tit -->
                </a>
            </aside></navbar>
        <div class="warp-inner">
            <div class="draft" style="display: block;" id="tianjia">
                <div>
                    <!-- ngIf: draft.showTips&&draft.bannerList.length>0 --><div class="pgc-banner-list swiper-container ng-scope" ng-if="draft.showTips&amp;&amp;draft.bannerList.length&gt;0">
                        <div class="swiper-wrapper">
                            <!-- ngRepeat: banner in draft.bannerList --><div class="swiper-slide ng-scope" ng-repeat="banner in draft.bannerList">
                                <a class="banner-link"   href="{{url('user/articleadd')}}"><img ng-src="{{url('user/articleadd')}}" src="{{url('images/20161223191424.png')}}"></a>
                            </div><!-- end ngRepeat: banner in draft.bannerList -->
                        </div>

                    </div>
                    <p class="has-none ng-scope" ng-if="draft.dataList.object_list.length&lt;1">
                        <a class="addnew-btn" href="{{url('user/articlecreate')}}" target="_blank">+ 添加新文章</a>
                    </p><!-- end ngIf: draft.dataList.object_list.length<1 -->
                </div>
            </div>
            <div class="draft" style="display:none;" id="list">
                @foreach($res as $v)
                <div id="text">
                    <img src="{{url('images/').'/'.$v['pic']}}" alt="" style="width: 100px;vertical-align: bottom ">
                  <a href="{{url('user/articlelist')}}">{{$v['title']}}</a>{{$v['created_at']}}
                </div>
                    @endforeach
            </div>
        </div>
    </div>
    {{--切换内容--}}
    <script>
        $('#created').click(function(){
            $('#create').removeClass('active');
            $(this).addClass('active');
            $('#tianjia').css('display','none');
            $('#list').css('display','block');

        })
        $('#create').click(function () {
            $('#created').removeClass('active');
            $(this).addClass('active');
            $('#list').css('display','none');
            $('#tianjia').css('display','block');

        })
    </script>
</div>
    @endsection